3.384 \(\int (a+b \tan ^4(c+d x)) \, dx\)

Optimal. Leaf size=35 \[ a x+\frac{b \tan ^3(c+d x)}{3 d}-\frac{b \tan (c+d x)}{d}+b x \]

[Out]

a*x + b*x - (b*Tan[c + d*x])/d + (b*Tan[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0251603, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3473, 8} \[ a x+\frac{b \tan ^3(c+d x)}{3 d}-\frac{b \tan (c+d x)}{d}+b x \]

Antiderivative was successfully verified.

[In]

Int[a + b*Tan[c + d*x]^4,x]

[Out]

a*x + b*x - (b*Tan[c + d*x])/d + (b*Tan[c + d*x]^3)/(3*d)

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \left (a+b \tan ^4(c+d x)\right ) \, dx &=a x+b \int \tan ^4(c+d x) \, dx\\ &=a x+\frac{b \tan ^3(c+d x)}{3 d}-b \int \tan ^2(c+d x) \, dx\\ &=a x-\frac{b \tan (c+d x)}{d}+\frac{b \tan ^3(c+d x)}{3 d}+b \int 1 \, dx\\ &=a x+b x-\frac{b \tan (c+d x)}{d}+\frac{b \tan ^3(c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.0263659, size = 44, normalized size = 1.26 \[ a x+\frac{b \tan ^3(c+d x)}{3 d}+\frac{b \tan ^{-1}(\tan (c+d x))}{d}-\frac{b \tan (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[a + b*Tan[c + d*x]^4,x]

[Out]

a*x + (b*ArcTan[Tan[c + d*x]])/d - (b*Tan[c + d*x])/d + (b*Tan[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 43, normalized size = 1.2 \begin{align*} ax+{\frac{b \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3\,d}}-{\frac{b\tan \left ( dx+c \right ) }{d}}+{\frac{b\arctan \left ( \tan \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*tan(d*x+c)^4,x)

[Out]

a*x+1/3*b*tan(d*x+c)^3/d-b*tan(d*x+c)/d+b/d*arctan(tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.49651, size = 46, normalized size = 1.31 \begin{align*} a x + \frac{{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} b}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+tan(d*x+c)^4*b,x, algorithm="maxima")

[Out]

a*x + 1/3*(tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d*x + c))*b/d

________________________________________________________________________________________

Fricas [A]  time = 1.39265, size = 82, normalized size = 2.34 \begin{align*} \frac{b \tan \left (d x + c\right )^{3} + 3 \,{\left (a + b\right )} d x - 3 \, b \tan \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+tan(d*x+c)^4*b,x, algorithm="fricas")

[Out]

1/3*(b*tan(d*x + c)^3 + 3*(a + b)*d*x - 3*b*tan(d*x + c))/d

________________________________________________________________________________________

Sympy [A]  time = 0.261537, size = 32, normalized size = 0.91 \begin{align*} a x + b \left (\begin{cases} x + \frac{\tan ^{3}{\left (c + d x \right )}}{3 d} - \frac{\tan{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \tan ^{4}{\left (c \right )} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+tan(d*x+c)**4*b,x)

[Out]

a*x + b*Piecewise((x + tan(c + d*x)**3/(3*d) - tan(c + d*x)/d, Ne(d, 0)), (x*tan(c)**4, True))

________________________________________________________________________________________

Giac [B]  time = 2.25889, size = 797, normalized size = 22.77 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+tan(d*x+c)^4*b,x, algorithm="giac")

[Out]

a*x + 1/12*(3*pi + 12*d*x*tan(d*x)^3*tan(c)^3 - 3*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x
) - 2*tan(c))*tan(d*x)^3*tan(c)^3 - 3*pi*tan(d*x)^3*tan(c)^3 + 6*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(
c)))*tan(d*x)^3*tan(c)^3 + 6*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^3*tan(c)^3 - 36*d*x*ta
n(d*x)^2*tan(c)^2 + 9*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*tan
(c)^2 + 9*pi*tan(d*x)^2*tan(c)^2 - 18*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c)))*tan(d*x)^2*tan(c)^2 -
18*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^2*tan(c)^2 + 12*tan(d*x)^3*tan(c)^2 + 12*tan(d*x
)^2*tan(c)^3 + 36*d*x*tan(d*x)*tan(c) - 9*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan(d*x) - 2*ta
n(c))*tan(d*x)*tan(c) - 4*tan(d*x)^3 - 9*pi*tan(d*x)*tan(c) + 18*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(
c)))*tan(d*x)*tan(c) + 18*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)*tan(c) - 36*tan(d*x)^2*ta
n(c) - 36*tan(d*x)*tan(c)^2 - 4*tan(c)^3 - 12*d*x + 3*pi*sgn(2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 - 2*tan
(d*x) - 2*tan(c)) - 6*arctan((tan(d*x)*tan(c) - 1)/(tan(d*x) + tan(c))) - 6*arctan((tan(d*x) + tan(c))/(tan(d*
x)*tan(c) - 1)) + 12*tan(d*x) + 12*tan(c))*b/(d*tan(d*x)^3*tan(c)^3 - 3*d*tan(d*x)^2*tan(c)^2 + 3*d*tan(d*x)*t
an(c) - d)